<?php 


$url=addParameter("", "","");

$mail=getParameter("Portlet_".$PortletId."_email");


if (getParameter("Portlet_".$PortletId."_action") && ew_CheckEmail($mail) )
{


	$bean = R::dispense('portal_newsletter_mails');
	$bean->portalId=$portalId;
	$bean->mail=$mail;
	$bean->addDate=new DateTime();
	R::store($bean);

}
//echo $PortletId;

?>
<form action="<?=$url?>" method="POST" id="Portlet_<?=$PortletId?>_form" >
<input type="hidden" value="add" name="Portlet_<?=$PortletId?>_action" id="Portlet_<?=$PortletId?>_action"/>

<div class="newslettermail"><span>NEWSLETTER</span><input type="text" class="newslettermail" value="" name="Portlet_<?=$PortletId?>_email" id="Portlet_<?=$PortletId?>_email" ><a onclick="$('#Portlet_<?=$PortletId?>_form').submit();" >OK</a></div>
</form>